FROM registry.cn-beijing.aliyuncs.com/hfhksoft/java:11-jre-slim-buster
MAINTAINER lijiajia

WORKDIR /cairo/system/service
COPY dependencies/ ./
COPY snapshot-dependencies/ ./
COPY spring-boot-loader/ ./
COPY application/ ./

ENV SPRING_PROFILES_ACTIVE container
ENV JVMOPS ''
ENV JAVAOPS ''
ENTRYPOINT ["sh", "-c","exec java $JVM_OPTS $JAVA_OPTS org.springframework.boot.loader.JarLauncher"]

VOLUME /cairo/system/service/logs

EXPOSE 80/tcp 9000/tcp
HEALTHCHECK --start-period=10s \
            --interval=10s \
            --timeout=5s \
            --retries=5 \
            CMD curl --silent --fail --request GET http://localhost:9000/actuator/health | jq --exit-status '.status == "UP"' || exit 1
